package day2018_lab02.test11;
//求面积、求周长的方法，printMyWay()方法要能显示矩形的边长、面积和周长。
public class Rectangle implements Printx {

    int length;
    int width;
    int area;
    int c;

    public  int  area(){
        area= length*width;
        return  area;
    }
    public int getC(){
        c=(length+width)*2;
        return c ;
    }

    @Override
    public void printMyway() {
        System.out.println("长宽："+length+width+area()+getC());

    }
}
